
var AppTester = function() {
	this.func = function() {};
	
	this.onsend = function() {};
	this.onnext = function() {};
};

// Set request Handler -------------
AppTester.prototype.post = function(str, func) {
	this.func = func;
};

AppTester.prototype.get = function(str, func) {
	this.func = func;
};

AppTester.prototype.all = function(str, func) {
	this.func = func;
};
// ---------------------------------


AppTester.prototype.exec = function(body, session){
	var req = {
			body : body,
			session : session
	};
	
	var res = {
		send : function(data) {
			this.onsend(data);
		}
	};
	
	this.func(req, res, function() {
		this.onnext();
	});
};

module.exports = AppTester;
